<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>


<form class="filtroRangos" id="myForm" action="<?php echo url_for('/estrateguia/'.($form->getObject()->isNew() ? 'createEstrategia' : 'updateEstrategia').(!$form->getObject()->isNew() ? '?id='.$form->getObject()->getId() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<table width="100%" cellpadding="0" cellspacing="0" border="0" id="tableRango">
    <tr>
        <td>
            <div class="title-windows">Crear una nueva estrategia
            
                <a href="javascript:void(0);" onclick="closeAll();" class="close-windows">
                    
                <img src="/images/icon/remove.png" title="Close"  />
                
                </a>
            </div>
        </td>
    </tr>
    <tr>
        <td class="" style="vertical-align:top; padding: 10px;">

<!--Formulario con declaración de class y de ID Formulario-->
<?php echo $form->renderGlobalErrors() ?>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
    
      
      <tr>
        <td class="form-field" style="padding-top: 0px; margin-top: 0px;">
          <?php echo $form['fecha']->renderLabel() ?>
          <?php echo $form['fecha']->renderError() ?>
          <div class="clear"></div>
          <?php echo $form['fecha'] ?>
        </td>
      </tr>
      
<script>
    
    $(document).ready(function() {
        $( "#estrategia_fecha").datepicker({
                            defaultDate: "+1w",
                            changeMonth: true,
                            dateFormat: "yy-mm-dd",
                            onClose: function( selectedDate ) {
                                if($(this).val().length<10){
                                    $('#submit').attr('disabled','disabled'); 
                                }else{
                                    $('#submit').removeAttr('disabled');
                                }
                            }
        });                        
        
        
   
        
        
    });
    
    
   
</script>      
      

  </table>


</td>
    </tr>
    <tr><td class="form-action-bottom">
            
          <?php echo $form->renderHiddenFields(false) ?>
            <input class="button-submit" type="submit" value="Guardar"  id="submit" disabled="disabled"/>
          <a class="button-done" href="javascript:void(0);" onclick="closeAll();" >Cerrar</a>
    
        </td></tr>

</table>

</form>

